1. Field
Exemplary embodiments relate to encoding and decoding of an image, and more particularly, to a method and apparatus for encoding an image and a method and apparatus for decoding an image by using a motion vector of a merged block obtained by merging blocks. Also, exemplary embodiments relate to a method and apparatus for encoding an image and a method and apparatus for decoding an image by splitting an image in units of objects, and performing motion estimation and compensation in the units of objects.
2. Related Art
In an image compression method, such as MPEG-1, MPEG-2, MPEG-4, or H.264/MPEG-4 advanced video coding (AVC), an image is split into several regions (pixel groups) for precise motion estimation, and a motion vector is estimated for each region. A block matching algorithm (BMA) method that is most widely used defines a pixel group in a block shape with respect to a current frame, and estimates a motion vector in units of blocks by searching a previous frame for a most similar block of each block.
Since a motion estimation method, such as a BMA, estimates a motion vector that minimizes a sum of absolute difference (SAD), it is highly likely that actual motion of an object in an image is not accurately estimated. For example, while motion-estimating a block included in a homogeneous object, since it is highly likely that a plurality of blocks similar to a block that is motion-estimated may exist in a previous frame, a motion vector may not accurately reflect actual motion of an object.
Also, since motion estimation is performed in units of blocks having a predetermined size without considering an object included in an image, accuracy and precision of the motion estimation may decrease. For example, since a plurality of regions similar to a block may exist in a previous frame when a size of the block is small compared to an object, a motion vector that is not an actual motion vector may be selected as a final motion vector. Alternatively, when a size of a block is larger than an object, motion estimation may be wrongly performed since the block may include not only pixels of the object but also pixels of a background region.